<!DOCTYPE html>
<html>
  <head>
      <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  </head>
  <body>
    <div id="app">
      <localassembly ></localassembly>
      <globalassembly ></globalassembly>

    </div>
    <script>
    
    // 全局组件,不需要挂载
    Vue.component('globalassembly',{
      template: '<input type="button" value="clickme"/>',
    })
    // 局部组件
    const localassembly =  {
      template: '<div><span> 大家好大家好 </span> <globalassembly ></globalassembly></div>',
      data() {
        return {
          msg:  '这里是地球',
        }
      }
    }
    const vm = new Vue({
      el: '#app',
      components: {
        localassembly
      }
    })
    </script>
  </body>
</html>